package com.campus.mapper;

import com.campus.domain.entity.LostItemImage;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * 失物图片Mapper
 */
@Mapper
public interface LostItemImageMapper {
    
    // 批量插入图片
    int batchInsert(@Param("images") List<LostItemImage> images);
    
    // 根据失物ID查询图片
    @Select("SELECT * FROM lost_item_images WHERE item_id = #{itemId} ORDER BY sort_order")
    List<LostItemImage> selectByItemId(Long itemId);
    
    // 删除失物图片
    @Delete("DELETE FROM lost_item_images WHERE item_id = #{itemId}")
    int deleteByItemId(Long itemId);
}

